how to create arduino function